import OverlayBase from './overlayBase';

class PolygonOverlay extends OverlayBase {
  constructor(options) {
    super(options);
    let { payload, style = null, positions } = options;
    let defaultOpt = {
      stroke: true,
      color: 'rgba(255,66,87,0.9)',
      weight: 1,
      opacity: 1,
      fillOpacity: 0.5,
      // dashArray: '3, 6',
      // dashOffset: null,
      fillColor: 'rgba(255,66,87,0.3)',
      fillOpacity: 1,
      ...style,
    };
    this._lft = L.polyline(positions, { ...defaultOpt });
  }
}

export default PolygonOverlay;
